package apollo.game.entity;

import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;

import apollo.game.screen.Displayable;
import apollo.game.utils.ResHelp;

public class Role extends Entity implements Displayable {

	private Sprite[] sprites;
	private int roleIdx;
	
	public Role(String name) {
		super(name);
		
		roleIdx = 0;
		load();
	}
	
	public int getRoleIndex() {
		return roleIdx;
	}
	public void setRoleIndex(int index) {
		this.roleIdx = index;
	}

	public void load() {
		sprites = ResHelp.loadRole("1");
	}
	
	public void render(SpriteBatch batch, int x, int y, int width, int height) {
		sprites[this.roleIdx].setPosition(x, y);
		sprites[this.roleIdx].draw(batch);
	}
}
